package com.kuiandjie.service;


import java.util.List;

import com.kuiandjie.dao.DocumentDao;
import com.kuiandjie.entity.Document;

public class DocumentService {
	private DocumentDao dao = new DocumentDao();

	public List<Document> findAllDocumentByProId(int curpid) {
		return dao.findAllDocumentByProId(curpid);
	}

	public int saveDocument(Document d) {
		return dao.saveDocument(d);
		
	}

	public Document findDocumentById(String did) {
		return dao.findDocumentById(did);
	}

	public void editDocument(String title, String content,String did) {
		dao.editDocument(title,content,did);
		
	}

	public void deleteDocument(String did) {
		dao.deleteDocument(did);
		
	}

	

	public Document findDocumentByIdAndDid(int id, String did) {
		return dao.findDocumentByIdAndDid(id,did);
	}
	
	

}
